
dict1 = {'name': "tom", 'age': 12}

print(dict1.get('name'))
print(dict1.get('classmate'))

# dict1.popitem('classmate')

dict2 = {'name': '张三'}
dict2.setdefault('name')  # 默认键值名
# 注意无中生有
print(dict2)


